package com.bharat.cm.dao;

import org.hibernate.SessionFactory;
import org.hibernate.classic.Session;

import com.bharat.cm.domain.Clas;

public class CollegeMasterDaoImpl implements ICollegeMasterDao{

	private SessionFactory sessionFactory;
	
	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}
	
	public CollegeMasterDaoImpl() {
	}

	/**
	 * Creates a new Class
	 */
	@Override
	public void addClass(Clas clas) {

		Session session = this.sessionFactory.openSession();
		session.save(clas);
	}

}
